
package br.com.infnet.formularioeletronico.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class RespondePK implements Serializable {
    @Basic(optional = false)
    @Column(name = "id_aluno")
    private int idAluno;
    @Basic(optional = false)
    @Column(name = "id_questao")
    private int idQuestao;

    public int getIdAluno() {
        return idAluno;
    }

    public void setIdAluno(int idAluno) {
        this.idAluno = idAluno;
    }

    public int getIdQuestao() {
        return idQuestao;
    }

    public void setIdQuestao(int idQuestao) {
        this.idQuestao = idQuestao;
    }


    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idAluno;
        hash += (int) idQuestao;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RespondePK)) {
            return false;
        }
        RespondePK other = (RespondePK) object;
        if (this.idAluno != other.idAluno) {
            return false;
        }
        if (this.idQuestao != other.idQuestao) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.infnet.formularioeletronico.modelo.RespondePK[ idAluno=" + idAluno + ", idQuestao=" + idQuestao + " ]";
    }
    
}
